<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title> 游戏的的第一步</title>
</head>

<body>
    <script>
        console.log("======= 欢迎来到宠物游戏==========")
       var oMyPet = function(){
        var result = prompt("1.注册 2.登录 3.退出")
        switch (result) {
            case "1":
                console.log("注册")
                break;
            case "2":
                console.log("登录")
                break;
            case "3":
                console.log("退出")
                break;
            default:
            console.log("输入有误")
            arguments.calle()
                break;
        }
       }

       oMyPet()





    </script>

</body>

</html>